package com.example.everying.model.entity.official;/*
 * 项目名称: everything
 * 文件名: OfficialNotification
 * 作者: 张泽阳
 * 日期: 2025/6/19
 * 描述:
 */

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

@Data
public class OfficialNotification {
    @ApiModelProperty(value = "id")
    @NotNull(message = "id不能为空")
    private String id;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "图片url")
    private String pictureUrl;

    @ApiModelProperty(value = "活动url")
    private String activityUrl;

    @ApiModelProperty(value = "文件地址")
    private String activityPath;

    @ApiModelProperty(value = "活动url")
    private String fileName;

    @ApiModelProperty(value = "内容")
    private String content;

    @ApiModelProperty(value = "类型")
    private Byte type;

    @ApiModelProperty(value = "发送者ID")
    private Long senderId;

    @ApiModelProperty(value = "优先级(0-9)")
    private String priority;

    @ApiModelProperty(value = "状态(0:待发送 1:已发送 2:已取消)")
    private String status;

    @ApiModelProperty(value = "是否删除")
    private Boolean isDelete;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "消息接收状态: 1-已读, 2-未读")
    private String msgStatus;
}
